// get 拿到item，然后返回

//   stringify json 对象转换为json字符串  键值存起来

// 移除

export const get = (key:string):Object => {
    let item = window.sessionStorage.getItem(key)
    return item ? JSON.parse(item):null
  }
  
  export const set = (key:string, value: Object):void => {
    window.sessionStorage.setItem(key, JSON.stringify(value))
  }
  
  export const remove = (key: string):void => {
    window.sessionStorage.removeItem(key)
  }
